#pragma once
#include "tbintreenodebase.h"

template <typename TElem>
class TBinTreeNode :
	public TBinTreeNodeBase<TElem>
{
private:
	TBinTreeNode<TElem> *lc,*rc,*father;
public:
	TBinTreeNode(void);
	~TBinTreeNode(void);
	virtual TBinTreeNodeBase<TElem> * GetSon(char sonNo)
	{
		if(sonNo=1)return lc;
		else
			return rc;
	};
	virtual TBinTreeNodeBase<TElem> * SetSon(char sonNO, TBinTreeNodeBase<TElem> * pSon)
	{
		sonNo==1?lc=(TBinTreeNode<TElem> *)pson:rc=(TBinTreeNode<TElem> *)pSon;
		return pSon;
	};
	virtual TBinTreeNodeBase<TElem> * GetFather(){ return father;}
	virtual TBinTreeNodeBase<TElem> * SetFather(TBinTreeNodeBase<TElem> * f)
	{
		father=(TBinTreeNodeBase<TElem> *)f;
	};


};
